Matching and Replacing concatenated strings

Hi,

Right now I am dealing with concatenated strings. My goal is to take a concatenated string, save it to a variable and then check what was saved with another concatenated string then to add which part of the string that is missing to the original variable. This is dealing with attributes. A little background is that one of my attributes is populated by the links that are coming into it. When I run the program, if anything was manually added to the project, it is overwritten since it is lacking a link. So I'm trying to make it so I can keep what was originally there, including the parts manually written there as well as add anything that obtained a link.
Eric_Hillen - Thu Feb 17 14:48:38 EST 2011

Re: Matching and Replacing concatenated strings
Eric_Hillen - Thu Feb 17 14:53:45 EST 2011

So my question would basically be how to compare concatenated strings to each other and add to one, what it is missing from the other.

I'm fairly new to DOORS and DXL.

Re: Matching and Replacing concatenated strings
Mathias Mamsch - Thu Feb 17 16:10:09 EST 2011

Eric_Hillen - Thu Feb 17 14:53:45 EST 2011
So my question would basically be how to compare concatenated strings to each other and add to one, what it is missing from the other.

I'm fairly new to DOORS and DXL.

Imagine you have the strings A and B and want to add the part of B to A that is new. Then you first split up the string A using some separator (e.g. newline) and create a string skip list 'SkipA', where you put each part of A in there. Then you split up B, iterate over all items of B, checking if the substring of B is contained in 'SkipA'. If not you add it to the original A string. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS